function message(type, text) {
        const div = document.createElement('div');
        div.textContent = text;
        div.style.position = 'fixed';
        div.style.top = '8%';
        div.style.left = '50%';
        div.style.transform = 'translate(-50%, -50%)';
        div.style.padding = '10px 30px';
        div.style.background = '#fff';
        div.style.color = type === 'success' ? '#28a745' : '#dc3545';
        div.style.fontSize = '14px';
        div.style.border = `1px solid ${type === 'success' ? '#ccc' : '#dc3545'}`;
        div.style.borderRadius = '8px';
        div.style.boxShadow = '0 4px 15px rgba(0,0,0,0.2)';
        div.style.zIndex = 9999;
        div.style.opacity = 0;
        div.style.transition = 'opacity 0.3s ease, transform 0.3s ease';
        document.body.appendChild(div);
        requestAnimationFrame(() => {
            div.style.opacity = 1;
            div.style.transform = 'translate(-50%, -50%) scale(1)';
        });
        setTimeout(() => {
            div.style.opacity = 0;
            div.style.transform = 'translate(-50%, -50%) scale(0.9)';
            setTimeout(() => div.remove(), 300);
        }, 1500);
    }
